import request from "@/utils/request";

export default {
  getList(pageNum, pageSize, serachObject) {
    return request({
      url: `admin/hosp/hospitalSet/findPageHospitalSet/${pageNum}/${pageSize}`,
      method: "post",
      data: serachObject
    });
  },
  deleteHospSetById(id) {
    return request({
      url: `admin/hosp/hospitalSet/${id}`,
      method: "delete"
    });
  },
  removeRows(idList) {
    return request({
      url: `admin/hosp/hospitalSet/batchRemove`,
      method: "delete",
      data: idList
    });
  },
  lockHospitalSet(id, status) {
    return request({
      url: `admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
      method: "put"
    });
  },
  save(hospitalSet) {
    return request({
      url: `admin/hosp/hospitalSet/saveHospitalSet`,
      method: "post",
      data: hospitalSet
    });
  },
  update(hospitalSet) {
    return request({
      url: `admin/hosp/hospitalSet/updateHospitalSet`,
      method: "put",
      data: hospitalSet
    });
  },
  getInfo(id) {
    return request({
      url: `admin/hosp/hospitalSet/getInfo/${id}`,
      method: "get"
    });
  }
};
